[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
@CPU             Return CPU Information                      Predefined EQU

  @CPU

     This predefined equate returns CPU information. It evaluates to a number
     with the following bits set:

                    Bit Number          Means
                    ----------          -----
                        0               8086 instructions supported
                        1               80186 instructions supported
                        2               80286 instructions supported
                        3               80386 instructions supported
                        7               Privileged instructions
                                                (. 80286) supported
                        8               8087 instructions supported
                        10              80287 instructions supported
                        11              80387 instructions supported

     Several of the above bits may be set. For example, a processor like the
     80286 supports 8086 instructions as well as 80186 instructions, so bits
     0, 1 and 2 would be set if the CPU is an 80286. Similarly, if an 80387
     was present, bits 8, 10, and 11 would be set.

     You can check the value of @CPU with an IF statement, and conditionally
     assemble CPU-specific instructions that way.

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson